#include "StdAfx.h"
#include "NtlPacketMP.h"

const char* s_packetName_MP[] =
{
	DECLARE_PACKET_NAME( MP_HEARTBEAT ),
	DECLARE_PACKET_NAME( MP_AUTH_SERVER_FARM_INFO ),
	DECLARE_PACKET_NAME( MP_CHARACTER_SERVER_FARM_INFO ),
	DECLARE_PACKET_NAME( MP_GAME_SERVER_FARM_INFO ),
	DECLARE_PACKET_NAME( MP_GAME_SERVER_CHANNEL_INFO ),
	DECLARE_PACKET_NAME( MP_SERVERS_INFO ),
	DECLARE_PACKET_NAME( MP_SERVERS_INFO_END ),
	DECLARE_PACKET_NAME( MP_NOTIFY_ILLEGAL_SERVER ),

	DECLARE_PACKET_NAME( MP_SERVER_INFO_CHANGED_NFY ),
	DECLARE_PACKET_NAME( MP_AUTH_SERVER_FARM_INFO_CHANGED_NFY ),
	DECLARE_PACKET_NAME( MP_CHARACTER_SERVER_FARM_INFO_CHANGED_NFY ),

	DECLARE_PACKET_NAME( MP_GAME_SERVER_FARM_INFO_CHANGED_NFY ),
	DECLARE_PACKET_NAME( MP_GAME_SERVER_CHANNEL_INFO_CHANGED_NFY ),

	DECLARE_PACKET_NAME( MP_SERVERFARM_NAME_RES ),

	DECLARE_PACKET_NAME( MP_SERVER_CONTROL_TURN_ON_RES ),
	DECLARE_PACKET_NAME( MP_SERVER_CONTROL_TURN_OFF_RES ),
	DECLARE_PACKET_NAME( MP_SERVER_LOCK_RES ),
	DECLARE_PACKET_NAME( MP_SERVER_UNLOCK_RES ),
	DECLARE_PACKET_NAME( MP_SERVER_USER_ALL_KICK_RES ),
	DECLARE_PACKET_NAME( MP_SERVER_AGENT_PATCH_RES ),
	DECLARE_PACKET_NAME( MP_SERVER_VERSION_CHANGED_NFY ), // by sooshia 07/22/2008

	DECLARE_PACKET_NAME( MP_SERVER_COMMAND_START ),
	DECLARE_PACKET_NAME( MP_SERVER_COMMAND_INFO ),
	DECLARE_PACKET_NAME( MP_SERVER_COMMAND_END ),
	DECLARE_PACKET_NAME( MP_SERVERS_RECENTDATE_NFY ),
	DECLARE_PACKET_NAME( MP_SERVER_TURNOFF_FOR_DEVEL_NFY ),
	DECLARE_PACKET_NAME( MP_SERVER_STATUS_LOCALSETTING_INFO_RES ),
	DECLARE_PACKET_NAME( MP_SERVER_STATUS_LOCALSETTING_EDIT_RES ),

	DECLARE_PACKET_NAME( MP_PING_RES ),
};


//------------------------------------------------------------------
//
//------------------------------------------------------------------
const char * NtlGetPacketName_MP(WORD wOpCode)
{
	if( wOpCode < MP_OPCODE_BEGIN )
	{
		return "NOT DEFINED PACKET NAME : OPCODE LOW";
	}

	if( wOpCode > MP_OPCODE_END )
	{
		return "NOT DEFINED PACKET NAME : OPCODE HIGH";
	}

	int nIndex = wOpCode - MP_OPCODE_BEGIN;
	if( nIndex >= _countof( s_packetName_MP) )
	{
		return "OPCODE BUFFER OVERFLOW";
	}

	return s_packetName_MP[ nIndex ];
}